package com.huynhchihieu.dao;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.huynhchihieu.domain.Family;

@Repository
public class FamilyDAOImpl implements FamilyDAO{

	@PersistenceContext(name = "persistenceUnit")
	EntityManager entityManager;
	
	public void addFamily(Family family) {
		
	}
	
	public List<Family> getAllFamilies(){
		return entityManager.createNativeQuery("select *from family").getResultList();
	}

}
